$OpenBSD: patch-common_argus_main_c,v 1.3 2015/01/26 13:13:58 steven Exp $
--- common/argus_main.c.orig	Mon Jun  9 20:18:59 2014
+++ common/argus_main.c	Mon Sep 29 23:50:59 2014
@@ -114,7 +114,7 @@ main (int argc, char **argv)
 #if defined(ARGUS_THREADS)
    int hosts = 0;
    pthread_attr_t attr;
-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) && !defined(CYGWIN)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0) && !defined(sun) && !defined(CYGWIN)
    int thread_policy;
    struct sched_param thread_param;
 #if HAVE_SCHED_GET_PRIORITY_MIN
@@ -138,7 +138,7 @@ main (int argc, char **argv)
    if ((status = pthread_attr_init(&attr)) != 0)
       ArgusLog (LOG_ERR, "pthreads init error");
  
-#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && !defined(sun) && !defined(CYGWIN)
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0) && !defined(sun) && !defined(CYGWIN)
    if ((status = pthread_attr_getschedpolicy(&attr, &thread_policy)) != 0)
       ArgusLog (LOG_ERR, "pthreads get policy error");
    if ((status = pthread_attr_getschedparam(&attr, &thread_param)) != 0)
